link_directories(${PROJECT_SOURCE_DIR}/lib/win32/)

option(HAVE_TEST_VIDEO "use simulation video for test" ON)
option(HAVE_SERIAL_PORT "use serial port for imghost" ON)
option(HAVE_TEST_ENCODE_H265 "use encode h265" ON)

if(HAVE_TEST_VIDEO)
add_definitions(-D_HAVE_TEST_VIDEO_)
endif()

set(simulate_video  
 ${PROJECT_SOURCE_DIR}/mod/simulate/frame_src_component.cpp 
 ${PROJECT_SOURCE_DIR}/mod/simulate/frame_src_composite.cpp 
 ${PROJECT_SOURCE_DIR}/mod/simulate/frame_src_file.cpp 
 ${PROJECT_SOURCE_DIR}/mod/simulate/simulate_app.cpp 
 ${PROJECT_SOURCE_DIR}/mod/simulate/frame_src_enc_h264.cpp 
 ${PROJECT_SOURCE_DIR}/mod/simulate/frame_src_enc_h265.cpp 
  ${PROJECT_SOURCE_DIR}/mod/simulate/capture_desktop.cpp 
   ${PROJECT_SOURCE_DIR}/mod/simulate/capture_window_dxgi.cpp 
)
if(HAVE_TEST_ENCODE_H265)
add_definitions(-D_HAVE_ENCODE_H265_)
endif()
include_directories(${PROJECT_SOURCE_DIR}/include/x265)
include_directories(${PROJECT_SOURCE_DIR}/include/x264)
aux_source_directory(${PROJECT_SOURCE_DIR}/mod/simulate  simulate_src)
set(plat win32)
set(extra_lib libx265.dll d3d11 d3d9 dxgi)
